Deleted unused files.
[Sonic-Engine-360.git] / GMS2 / Sonic Engine 360 / objects / Plat_Moving / Step_1.gml
bloba659f3a9724631347eda1a9d473e8c1a5abcdc27
1 with (Player)       // Note with all items, the code is used in the items but it runs through inside the Player\r
2 {\r
3     other.solid = (y + mask_radius <= other.y - other.offset && full_vspeed >= 0);  //makes it a jump-through platform\r
4 \r
5     // Move the Player position by the platform hspeed/vspeed values so the Player moves the same amount as the platform\r
6     if (ground && other.solid && place_meeting(x, y + 1, other))\r
7     {\r
8         x += other.hsp;\r
9         y += other.vsp;\r
10     }\r
11 }\r
13 // Direction changing code (not when time_change is set to -1 no change occurs)\r
14 if (time_change != -1)\r
15 {\r
16     if (time >= time_change)    // Check if it's time to change the platform momentum\r
17     {\r
18         switch (change_type)    // Switch so you can have different actions occurring\r
19         {\r
20             case 0:             // Standard change type - just reverses the platform speed\r
21                 hsp *= -1;\r
22                 vsp *= -1;\r
23             break;\r
24         }\r
25         time = 0;  // Reset the time\r
26     }\r
27     time += 1;  // Increase the time every step\r
28 }\r
30 // Move the platform depending on it's hspeed and vspeed\r
31 x += hsp;\r
32 y += vsp;\r